package top.aicats.pattern.prototype.CircleProtocol;

public class ProtocolTest {
    public static void main(String[] args) {
        Shape circleShape = new CircleShape();
        circleShape.setId("ddd");
        Shape rectangleShape = new RectangleShape();

        Shape cloneCircle = (Shape) circleShape.clone();
        cloneCircle.draw();
        System.out.println(cloneCircle.getId());

        System.out.println(circleShape == cloneCircle);

        Shape cloneRectangle = (Shape) rectangleShape.clone();
        cloneRectangle.draw();
    }
}
